import config
import time


class Combat_mode:
    # Перенести ветку экзоскелет или лабаратория или охранная система
    def __init__(self) -> None:
        self.temp_enabling_activation = None
        self.temp_permission_check_speech = None

    def health_status(self):
        pass

    def off_security_system(self):
        pass

    def health(self):
        pass

    def activation_combat_mode(self):
        self.temp_enabling_activation = config.enabling_activation
        self.temp_permission_check_speech = config.permission_check_speech

    def shutdown_combat_mode(self):
        config.enabling_activation = self.temp_enabling_activation
        config.permission_check_speech = self.temp_permission_check_speech


class Work_mode:
    def __init__(self) -> None:
        self.timer_name = config.kernel_start_time

    def cheek_timer_name(self):
        now_time = time.time()
        print(int(now_time - self.timer_name))
        if int(now_time - self.timer_name) >= config.value_timer_sleep:
            config.name_separation = True
        else:
            config.name_separation = False

    def update_timer_name(self):
        self.timer_name = time.time()

    def wrapper_timer(self, key_mode, func):
        if config.work_mode == key_mode:
            func()
